<div class="listar_exame">

  <table class="exame_grafico">
    <tbody>
      <tr>
        <td>
          <div id="exame" class="exame" style="width:750px;height:300px"></div>
        </td>
        <td>
          <div id="exame_tipo">
            <input type="radio" id="exame_tipo_0" name="exame[tipo]" value="0" checked="checked" onchange="visualizarChart(true, true)"/>Ecg<br/>
            <input type="radio" id="exame_tipo_1" name="exame[tipo]" value="1" onchange="visualizarChart(true, true)"/>Acelerometro
          </div>
        </td>
      </tr>
      <tr>
        <td>
        <table>
          <tbody>
            <tr>
              <td class="button nav_left">
                <input type="button" class="nav_button" id="exame_back" onclick="moverParaEsquerda()" value="<<"/>
                <input type="button" class="nav_button" id="exame_foward" onclick="moverParaDireita()" value=">>"/>
              </td>
              <td class="button nav_right">
                <input type="button" class="nav_button" id="exame_foward" onclick="ampliar()" value="zoom +"/>
                <input type="button" class="nav_button" id="exame_back" onclick="reduzir()" value="zoom -"/>
              </td>
            </tr>
          </tbody>
        </table>
        </td>
      </tr>
    </tbody>
  </table> 


  <div class="exame_options">
    <div class="checkbox_option">
      <%= check_box_tag :paciente_exame_1, "1", true, :onchange => "remontarChart()" %>
      <span id="grafico_nome_1">-</span>
    </div>
    <div class="checkbox_option">
      <%= check_box_tag :paciente_exame_2, "2", true, :onchange => "remontarChart()" %>
      <span id="grafico_nome_2">-</span>
    </div>
    <div class="checkbox_option">
      <%= check_box_tag :paciente_exame_3, "3", true, :onchange => "remontarChart()" %>
      <span id="grafico_nome_3">-</span>
    </div>
    <div class="checkbox_option">
      <%= check_box_tag :paciente_exame_live, "0", false, :onchange => "configAtualizacaoChart()" %>
      <span>Atualizar exame automaticamente</span>
    </div>
    
    <div class="atualizar_options">
      Escolha um exame já realizado
      <%= form_tag "atualizar", :remote => true do %>
        <%= hidden_field :paciente, :id %>
        <div class="single_select">
          <%= select_tag "paciente[exame_id]", options_for_select(@exames), :include_blank => true, :onchange => "visualizarChart(true, false)" %>
        </div>
        <div class="comentarios">        
          <br><label>Comentários:</label>
          <div><%= text_area :exame, :comentarios, :rows => 4 %></div>
        </div>
        <div class="button">
          <div id="submit_message" style="display:none"></div>
          <%= submit_tag 'SALVAR', :onclick => "loading()" %>
        </div>
      <% end %>
    </div>

    <script>
      visualizarChart(true, false);
      configAtualizacaoChart();
    </script>
  </div>
</div>
